<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>超市零售系统</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" th:href="@{/vendor/bootstrap/css/bootstrap.min.css}">
    <link th:href="@{/vendor/fonts/circular-std/style.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/libs/css/style.css}">
    <link rel="stylesheet" th:href="@{/vendor/fonts/fontawesome/css/fontawesome-all.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/vendor/datatables/css/dataTables.bootstrap4.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/vendor/datatables/css/buttons.bootstrap4.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/vendor/datatables/css/select.bootstrap4.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/vendor/datatables/css/fixedHeader.bootstrap4.css}">
</head>

<body>

<!-- main wrapper -->
<div class="dashboard-main-wrapper">
    <!-- navbar::头部导航栏 -->
    <div class="dashboard-header">
        <div th:insert="~{commons/commons::topBar}"></div>
    </div>
    <!-- left sidebar -->
    <div class="nav-left-sidebar sidebar-dark">
        <div class="menu-list">
            <div th:insert="~{commons/commons::sideBar}"></div>
        </div>
    </div>
    <!-- wrapper  -->
    <div class="dashboard-wrapper">
        <div class="container-fluid  dashboard-content">
            <div class="row">
                <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div class="page-header">
                        <h2 class="pageheader-title">库存信息</h2>
                        <div class="page-breadcrumb">
                            <nav aria-label="breadcrumb">
                                <ol class="breadcrumb">
                                </ol>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
            <form th:action="@{/product/queryProductBySomething2}" method="post">
                <div class="col-lg-3"  style="float: left">
                    <div class="input-group">
                        <span class="input-group-addon">
                             <span class="input-group-text" id="basic-addon1">商品编号</span>
                        </span>
                        <input type="text" name="proId" class="form-control" aria-label="...">
                    </div>
                </div>
                <div class="col-lg-3"  style="float: left">
                    <div class="input-group">
                        <span class="input-group-addon">
                             <span class="input-group-text" id="basic-addon2">商品名称</span>
                        </span>
                        <input type="text" name="proName" class="form-control" aria-label="...">
                    </div>
                </div>
                <div class="col-lg-3"  style="float: left">
                    <div class="input-group">
                        <span class="input-group-addon">
                             <span class="input-group-text" id="basic-addon3">商品类别</span>
                        </span>
                        <input type="text" name="proClass" class="form-control" aria-label="...">
                    </div>
                </div>
                <input type="submit" class="btn btn-primary" value="查询" style="float: left"/>
            </form>
            <br>
            <div class="row" style="margin-top: -20px">
                <div class="col-md-3 column">
                    <button type="button" class="btn btn-success" data-toggle="modal" data-target="#modalFade">商品入库</button>
                </div>
            </div>
            <br>
            <div class="row">
                <!-- basic table  -->
                <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered first text-center">
                                    <thead>
                                    <tr>
                                        <th>编号</th>
                                        <th>名称</th>
                                        <th>类别</th>
                                        <th>进货价</th>
                                        <th>销售价</th>
                                        <th>库存量</th>
                                        <th>已售量</th>
                                        <th>报废量</th>
                                        <th>在架数量</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="product_stock : ${allProductStock}">
                                        <td th:text="${product_stock.getProduct_id()}"></td>
                                        <td th:text="${product_stock.getProduct_name()}"></td>
                                        <td th:text="${product_stock.getProduct_class()}"></td>
                                        <td th:text="${product_stock.getProduct_import_price()}"></td>
                                        <td th:text="${product_stock.getProduct_export_price()}"></td>
                                        <td th:text="${product_stock.getProduct_stock()}"></td>
                                        <td th:text="${product_stock.getProduct_sold()}"></td>
                                        <td th:text="${product_stock.getProduct_scrap()}"></td>
                                        <td th:text="${product_stock.getProduct_online()}"></td>
                                        <td>
                                            <a class="btn btn-sm btn btn-info"
                                               th:href="@{/product/upProduct/}+${product_stock.getProduct_id()}">上架</a>
                                            <a class="btn btn-sm btn btn-success"
                                               th:href="@{/product/toImportExist/}+${product_stock.getProduct_id()}">入库</a>
                                            <a class="btn btn-sm btn btn-primary"
                                               th:href="@{/product/scrapProduct/}+${product_stock.getProduct_id()}">报废</a>
                                            <a class="btn btn-sm btn btn-danger"
                                               th:href="@{/product/updateProduct/}+${product_stock.getProduct_id()}">修改</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--商品入库模态框-->
    <div class="modal fade" id="modalFade" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel">商品入库</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <form th:action="@{/product/importProduct02}" method="post">
                            <div class="form-group row">
                                <label class="col-12 col-sm-3 col-form-label text-sm-right">入库商品编号</label>
                                <div class="col-12 col-sm-8 col-lg-6">
                                    <input type="text" name="product_Id" required="" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-12 col-sm-3 col-form-label text-sm-right">入库商品名称</label>
                                <div class="col-12 col-sm-8 col-lg-6">
                                    <input type="text" name="product_name" required="" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-12 col-sm-3 col-form-label text-sm-right">入库商品类型</label>
                                <div class="col-12 col-sm-8 col-lg-6">
                                    <input type="text" name="product_type" required="" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-12 col-sm-3 col-form-label text-sm-right">入库商品进货价</label>
                                <div class="col-12 col-sm-8 col-lg-6">
                                    <input type="text" name="product_Iprice" required="" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-12 col-sm-3 col-form-label text-sm-right">入库商品出售价</label>
                                <div class="col-12 col-sm-8 col-lg-6">
                                    <input type="text" name="product_Sprice" required="" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-12 col-sm-3 col-form-label text-sm-right">入库数量</label>
                                <div class="col-12 col-sm-8 col-lg-6">
                                    <input type="text" name="product_count" required="" class="form-control">
                                </div>
                            </div>
                            <div class="modal-footer" style="margin-right: 25%">
                                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                                <button type="submit" class="btn btn-space btn-primary" style="margin-top: 5px">提交</button>
                                <button type="reset" class="btn btn-space btn-secondary" style="margin-top: 5px">重置</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
    <!-- end footer -->
    <div class="footer">
        <div class="container-fluid">
            <div th:insert="~{commons/commons::footer}"></div>
        </div>
    </div>
</div>




<script th:src="@{/vendor/jquery/jquery-3.3.1.min.js}"></script>
<script th:src="@{/vendor/bootstrap/js/bootstrap.bundle.js}"></script>
<script th:src="@{/vendor/slimscroll/jquery.slimscroll.js}"></script>
<script th:src="@{/vendor/multi-select/js/jquery.multi-select.js}"></script>
<script th:src="@{/libs/js/main-js.js}"></script>

<script th:src="@{/vendor/datatables/js/dataTables.bootstrap4.min.js}"></script>
<script th:src="@{/vendor/datatables/js/buttons.bootstrap4.min.js}"></script>
<script th:src="@{/vendor/datatables/js/data-table.js}"></script>


</body>

</html>
